// 注册接口
$('#bindusergray').click(function () {
    // console.log('ok')
    let oinp = document.getElementById("in1")
    let oinp2 = document.getElementById("in2")
    let countbox = document.getElementById('countbox');
    let countbox1 = document.getElementById('countbox1');
    axios.get('http://jx.xuzhixiang.top/ap/api/reg.php', {
        params: {
            username: $('#in1').val(),

            password: $('#in2').val(),
        },
    })
        .then((res) => {
            console.log(res);
            alert(res.data.msg)
            if (res.data.code == 1) {
                alert('注册成功')
                $('countbox').css({ "display": "none" })
                // location.assign("../E宠商城首页.html")
            } else {
                alert("注册失败")
            }
        });
})
// /////////登录接口
$('#bindusergray1').click(function () {
    console.log('ok')
    let oinp3 = document.getElementById("in3")
    let oinp4 = document.getElementById("in4")
    axios.get('http://jx.xuzhixiang.top/ap/api/login.php', {
        params: {
            username: $('#in3').val(),

            password: $('#in4').val(),
        },
    })
        .then((res) => {
            console.log(res);
            alert(res.data.msg)
            if (res.data.code == 1) {
                alert('即将为你跳转')
                // location.href = '../E宠商城首页.html'
            }
        });
})